<?php

/**
 * JingYao-backend
 *
 * @link     https://gitee.com/wang-zhihui-release/jingyao-backend
 * @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
 */

namespace App\Console\Commands;

use App\Models\Grid;
use Illuminate\Console\Command;

class InitGridData extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'init:grid';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '初始化网格数据';

    /**
     * Create a new command instance.
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        Grid::query()->firstOrCreate([
            'type' => 1,
            'administrator' => '程立海,王秋清,赵春国',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 2,
            'administrator' => '王佳佳',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 3,
            'administrator' => '姚盛',
            'party_administrator' => '王彬',
            'village_leader' => '孙玉清',
            'flow_administrator' => '周伯忠',
            'region_leader' => '李文启',
            'title' => '居民一区: 一片区',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 3,
            'administrator' => '高飞',
            'party_administrator' => '白金翠',
            'village_leader' => '王瑞荣',
            'flow_administrator' => '周伯忠',
            'region_leader' => '朱明圆',
            'title' => '居民一区: 二片区',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 3,
            'administrator' => '李丽',
            'party_administrator' => '王桂艳',
            'village_leader' => '刘连英',
            'flow_administrator' => '张海英',
            'region_leader' => '王秋清',
            'title' => '居民一区: 三片区',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 3,
            'administrator' => '王青松',
            'party_administrator' => '杨宝军',
            'village_leader' => '寇秀会',
            'flow_administrator' => '张海英',
            'region_leader' => '王佳佳',
            'title' => '居民一区: 四片区',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 3,
            'administrator' => '刘莹',
            'party_administrator' => '王瑞芬',
            'village_leader' => '刘连英',
            'flow_administrator' => '牛丽',
            'region_leader' => '程立海',
            'title' => '居民一区: 五片区',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 3,
            'administrator' => '丁丽培',
            'party_administrator' => '王文革',
            'village_leader' => '刘曼华',
            'flow_administrator' => '牛丽',
            'region_leader' => '贾征',
            'title' => '居民一区: 六片区',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 3,
            'administrator' => '王志国',
            'party_administrator' => '韩凤起',
            'village_leader' => '孙玉华',
            'flow_administrator' => '王稳旭',
            'region_leader' => '王文远',
            'title' => '居民一区: 七片区',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 3,
            'administrator' => '王利和',
            'party_administrator' => '张洪星',
            'village_leader' => '郭保全',
            'flow_administrator' => '王稳旭',
            'region_leader' => '秦峰',
            'title' => '居民一区: 八片区',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 3,
            'administrator' => '李全春',
            'party_administrator' => '陈学清',
            'village_leader' => '王静茹',
            'flow_administrator' => '王瑞荣',
            'region_leader' => '刘继凤',
            'title' => '居民一区: 九片区',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 3,
            'administrator' => '杨春雷',
            'party_administrator' => '王新民',
            'village_leader' => '田丽荣',
            'flow_administrator' => '王瑞荣',
            'region_leader' => '韩海莹',
            'title' => '居民一区: 十片区',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 3,
            'administrator' => '刘鹏',
            'party_administrator' => '朱明圆',
            'village_leader' => '王秀芹',
            'flow_administrator' => '张明瑜',
            'region_leader' => '赵春国',
            'title' => '居民一区: 十一片区',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 3,
            'administrator' => '李晴',
            'party_administrator' => '刘亚军',
            'village_leader' => '黄淑珍',
            'flow_administrator' => '-',
            'region_leader' => '王继东',
            'title' => '居民二区: 十二片区',
        ]);
        Grid::query()->firstOrCreate([
            'type' => 3,
            'administrator' => '毛艳丽',
            'party_administrator' => '秦峰',
            'village_leader' => '王征东,李勇春',
            'flow_administrator' => '李海波',
            'region_leader' => '朱明圆',
            'title' => '企业区',
        ]);
        $this->info('网格信息初始化完成');
        return 0;
    }
}
